﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.Collections;

namespace 合并页面
{
    //用来存储文件的全路径和文件名,这样可以将其对应起来,
    //方便合并时可以取得文件内容.
    public partial class Form1 : Form
    {
        string exePath = Application.StartupPath + "\\";
        ArrayList chb_List = new ArrayList();//存储CheckBox选中时的数据。
        MyArrayList list = new MyArrayList(); //添加HTML页面时记录索引
        string savepath = "";   //得到image,NET,LOCAL的保存初始路径。
        bool clearFlag = false;  //当拖动图片进入时不清除，如果按下209Button后拖动图片进入则清除再来。

        [System.Runtime.InteropServices.DllImport("kernel32")]
        private static extern int GetPrivateProfileString(string section, string key, string def, System.Text.StringBuilder retVal, int size, string filePath);
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            savepath = IniFile.GetKeyValue("filepath", "savepath", "sys.ini");
            string[] str=Directory.GetDirectories(savepath,"*-*");
            for (int i = 0; i < str.Length; i++)
                cmb_dirList.Items.Add(str[i].Split('\\')[3]);
        }
        private void Form1_DragEnter(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
                e.Effect = DragDropEffects.Link;
            else
                e.Effect = DragDropEffects.None;

        }
        private void Form1_DragDrop(object sender, DragEventArgs e)
        {
            string path = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
            lsb_Left.Items.Add(path);
        }
        
        private void btn_add_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Multiselect = true;
            ofd.Filter = "HTML Documents|*.html;*.htm";
            ofd.FilterIndex = 1;
            StringBuilder fileReadPath = new StringBuilder(50);
            GetPrivateProfileString("filepath", "readpath", "", fileReadPath, 50,exePath+"sys.ini");
            if (!Directory.Exists(fileReadPath.ToString()))
            {
                MessageBox.Show("您设定的磁盘路径不存在");
            }
            ofd.InitialDirectory = fileReadPath.ToString();
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                string[] fileName = ofd.FileNames;
                string[] safefileName = ofd.SafeFileNames;
                for (int i = 0; i < fileName.Length; i++)
                {
                    FileIndex fileIndex = new FileIndex();
                    fileIndex.fileName = safefileName[i];
                    fileIndex.fullPath = fileName[i];
                    lsb_Left.Items.Add(safefileName[i]);
                    list.Add(fileIndex);
                }
                ArrayListSort sort=new ArrayListSort();
                list.Sort(sort);
            }
        }

        private string CreateBianMaFile(string bianma)
        {
            savepath = IniFile.GetKeyValue("filepath", "savepath", "sys.ini");
            string path = "";
            if (savepath != "")
            {
                path = savepath + "\\" + bianma;
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                    Directory.CreateDirectory(path + "\\images");
                    Directory.CreateDirectory(path + "\\lhl62411570");
                    Directory.CreateDirectory(path + "\\木子李ivy");
                    Directory.CreateDirectory(path + "\\taogonghuo");
                    Directory.CreateDirectory(path + "\\Local");

                    File.Copy("moban\\gongyong.css", path + "\\lhl62411570\\gongyong.css");
                    File.Copy("moban\\gongyong.css", path + "\\木子李ivy\\gongyong.css");
                    File.Copy("moban\\gongyong.css", path + "\\Local\\gongyong.css");
                    File.Copy("moban\\gongyong.css", path + "\\taogonghuo\\gongyong.css");
                }
            }
            else
            {
                MessageBox.Show("请设置INI文件中的根文件目录!!");
            }
            return path;
        }

        private void btn_hebing_Click(object sender, EventArgs e)
        {
            if (lsb_Left.Items.Count >= 2)
            {
                if (cmb_dirList.Text != "")
                {
                    string path = CreateBianMaFile(cmb_dirList.Text);
                    if (chb_List.Count == 1)
                    {
                        string str = HtmFile.HeBingFile(list);
                        HtmFile.WriteHtmToFile(str, "000.html", path + "\\" + chb_List[0].ToString());
                        clearFlag = true;
                    }
                    else
                    {
                        if (chb_List.Count == 0)
                            MessageBox.Show("请选择一个类型!!!");
                        else
                        {
                            string temp = "";
                            for (int i = 0; i < chb_List.Count; i++)
                                temp += chb_List[i]+"  ";

                            MessageBox.Show("您选择了" +temp+"多项请取消");
                        }
                    }
                }
                else
                {
                    MessageBox.Show("产品编码不能为空!!");
                }
            }
            else
            {
                MessageBox.Show("ListBox列表项至少要有两个及以上的文件");
            }
        }
        private void btn_copy_Click(object sender, EventArgs e)
        {
            int count = list.Count;
            if (count == 1)
            {
                if (list[0].GetType().Name == "HtmFile")
                {
                    Clipboard.SetDataObject(((HtmFile)list[0]).FileContent);
                    clearFlag = true;
                    MessageBox.Show("复制成功!");
                }
                else
                {
                    MessageBox.Show("不符合复制源码条件");
                }
            }
            else
            {
                MessageBox.Show("不符合复制源码条件");
            }
        }

        private void lsb_Left_MouseDown(object sender, MouseEventArgs e)
        {
            ToolTip tip = new ToolTip();
            int listIndex = lsb_Left.IndexFromPoint(e.X, e.Y);
            if (listIndex != -1)
            {
                if (((String)lsb_Left.SelectedItem).Contains(".jpg"))
                {
                    for (int i = 0; i < imgl_Img.Images.Count; i++)
                    {
                        lsv_Img.Items[i].BackColor = Color.White;
                    }
                    lsv_Img.Items[listIndex].BackColor = Color.Red;
                }
            }
            if (e.Button.ToString() == "Right")
            {
                contextMenuStrip1.Show(lsb_Left, e.Location);
            }
        }

        private void listBox1_DragEnter(object sender, DragEventArgs e)
        {
            e.Effect = DragDropEffects.All;
        }
        private void listBox1_DragDrop(object sender, DragEventArgs e)
        {
            if (clearFlag)
            {
                list.Clear();
                lsb_Left.Items.Clear();
                lsv_Img.Items.Clear();
                lsv_Img.Clear();
                imgl_Img.Images.Clear();
                clearFlag = false;

            }
            if (e.Data.GetDataPresent(DataFormats.FileDrop, false))
            {
                String[] files = (String[])e.Data.GetData(DataFormats.FileDrop);
                foreach (String s in files)
                {
                    if (s.Contains(".jpg") || s.Contains(".gif") || s.Contains(".png"))
                    {
                        lsb_Left.Sorted = false;
                        ImageFile img = new ImageFile(s);
                        if (!list.Contains(img))
                        {
                            list.Add(img);
                            int imgIndex = list.Count;
                            lsb_Left.Items.Add(img.FileName);
                           // this.lsv_Img.LargeImageList = this.imgl_Img;(可以在控件上绑定)
                            this.imgl_Img.Images.Add(img.MyImage);

                            ListViewItem lvi = new ListViewItem();
                            string lviName = imgIndex.ToString() + "  Name:" + img.FileName + "  宽:" + img.MyImage.Width + " 高:" + img.MyImage.Height;
                            this.lsv_Img.Items.Add(lviName, imgIndex - 1);
                            this.lsv_Img.Items[imgIndex - 1].ImageIndex = imgIndex - 1;
                        }
                    }
                    if (s.Contains(".htm") || s.Contains(".html"))
                    {
                        HtmFile htm = new HtmFile(s);
                        lsb_Left.Sorted = true;
                        if (!list.Contains(htm))
                        {
                            list.Add(htm);
                            lsb_Left.Items.Add(htm.FileName);
                        }
                        list.Sort(list);
                    }
                }
            }
        }

        private void lsv_Img_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (!picb_Img.Visible)
            {
                int lvItemIndex = lsv_Img.SelectedIndices[0];
                picb_Img.SizeMode = PictureBoxSizeMode.AutoSize;
                picb_Img.Image = ((ImageFile)list[lvItemIndex]).MyImage;

                panel_Img.AutoScroll = true;
                panel_Img.Visible = true;
                picb_Img.Visible = true;
            }
        }

        private void lsv_Img_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < imgl_Img.Images.Count; i++)
            {
                lsv_Img.Items[i].BackColor = Color.White;
            }
            lsb_Left.SelectedIndex = lsv_Img.SelectedIndices[0];
        }

        private void listBox1_DragOver(object sender, DragEventArgs e)
        {
            e.Effect = DragDropEffects.All;
        }

        private void 删除ToolStripMenuItem_Click(object sender, EventArgs e)
        {

            int index = lsb_Left.SelectedIndex;
            if (lsb_Left.SelectedIndex != -1)
            {
                //删除时如果是htm则要删除左边的ListBox和list(ArrayList)中的项
                lsb_Left.Items.RemoveAt(index);
                string listType = list[0].GetType().Name;
                if(listType=="HtmFile")
                    list.RemoveAt(index);
                if (list[0].GetType().Name == "ImageFile"&&list.Count>0)
                {
                    list.RemoveAt(index);
                    //对于图片文件则要删除ImageList和ListView中的数据，且更新ListView
                    imgl_Img.Images.RemoveAt(index);
                   // lsv_Img.Items.RemoveAt(index);
                    lsv_Img.Items.Clear();

                    int listIndex = list.Count;
                    for (int i = 0; i < listIndex; i++)
                    {
                        ListViewItem lvi = new ListViewItem();
                        string lviName = (i+1).ToString() + "  Name:" + ((ImageFile)list[i]).FileName + "  宽:" + ((ImageFile)list[i]).MyImage.Width + " 高:" + ((ImageFile)list[i]).MyImage.Height;
                        this.lsv_Img.Items.Add(lviName, i);
                        this.lsv_Img.Items[i].ImageIndex = i;
                    }
                }
            }
        }
        private void 向上ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int position = lsb_Left.SelectedIndex;
            lsb_Left.Sorted = false;
            if (lsb_Left.Items.Count >= 2)
            {
                if (position >=1)
                {
                    string value = lsb_Left.SelectedItem.ToString();//交换listbox中的元素
                    lsb_Left.Items.RemoveAt(position);
                    lsb_Left.Items.Insert(position - 1, value);

                    string listType = list[0].GetType().Name;
                    list.PreList(position);
                    if (listType == "ImageFile")
                    {
                        lsv_Img.Clear();
                        imgl_Img.Images.Clear();
                        for (int i = 0; i < list.Count; i++)
                        {
                            Image img = ((ImageFile)list[i]).MyImage;
                            this.imgl_Img.Images.Add(img);
                            ListViewItem lvi = new ListViewItem();
                            string lviName = (i + 1).ToString() + "  Name:" + ((ImageFile)list[i]).FileName + "  宽:" + img.Width + " 高:" + img.Height;
                            this.lsv_Img.Items.Add(lviName, i);
                            this.lsv_Img.Items[i].ImageIndex = i;
                        }
                    }
                }
            }
        }
        private void 向下ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int position = lsb_Left.SelectedIndex;
            lsb_Left.Sorted = false;
            if (lsb_Left.Items.Count >= 2)//至少有两个元素上下操作才有意义
            {
                if (position < lsb_Left.Items.Count-1) 
                {
                    string value = lsb_Left.SelectedItem.ToString();//交换listbox中的元素
                    lsb_Left.Items.RemoveAt(position);
                    lsb_Left.Items.Insert(position + 1, value);

                    string listType = list[0].GetType().Name;
                    list.NextList(position);
                    if (listType == "ImageFile")
                    {
                        lsv_Img.Clear();
                        imgl_Img.Images.Clear();
                        for (int i = 0; i < list.Count; i++)
                        {
                            Image img = ((ImageFile)list[i]).MyImage;
                            this.imgl_Img.Images.Add(img);
                            ListViewItem lvi = new ListViewItem();
                            string lviName = (i + 1).ToString() + "  Name:" + ((ImageFile)list[i]).FileName + "  宽:" + img.Width + " 高:" + img.Height;
                            this.lsv_Img.Items.Add(lviName, i);
                            this.lsv_Img.Items[i].ImageIndex = i;
                        }
                    }
                }
            }
        }
        private void 移到底部ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int position = lsb_Left.SelectedIndex;
            lsb_Left.Sorted = false;
            if (lsb_Left.Items.Count >= 2)
            {
                if (position < lsb_Left.Items.Count - 1)  //至少有两个元素上下操作才有意义
                {
                    string value = lsb_Left.SelectedItem.ToString();//交换listbox中的元素
                    lsb_Left.Items.RemoveAt(position);
                    lsb_Left.Items.Insert(lsb_Left.Items.Count, value);

                    string listType = list[0].GetType().Name;
                    list.ToTailList(position);
                    if (listType == "ImageFile")
                    {
                        lsv_Img.Clear();
                        imgl_Img.Images.Clear();
                        for (int i = 0; i < list.Count; i++)
                        {
                            Image img = ((ImageFile)list[i]).MyImage;
                            this.imgl_Img.Images.Add(img);
                            ListViewItem lvi = new ListViewItem();
                            string lviName = (i + 1).ToString() + "  Name:" + ((ImageFile)list[i]).FileName + "  宽:" + img.Width + " 高:" + img.Height;
                            this.lsv_Img.Items.Add(lviName, i);
                            this.lsv_Img.Items[i].ImageIndex = i;
                        }
                    }
                }
            }
        }
        private void 移到顶部ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int position = lsb_Left.SelectedIndex;
            lsb_Left.Sorted = false;
            if (position >= 1)  //至少有两个元素上下操作才有意义
            {
                string value = lsb_Left.SelectedItem.ToString();//交换listbox中的元素
                lsb_Left.Items.RemoveAt(position);
                lsb_Left.Items.Insert(0, value);

                string listType = list[0].GetType().Name;
                list.ToHeadList(position);
                if (listType == "ImageFile")
                {
                    lsv_Img.Clear();
                    imgl_Img.Images.Clear();
                    for (int i = 0; i < list.Count; i++)
                    {
                        Image img = ((ImageFile)list[i]).MyImage;
                        this.imgl_Img.Images.Add(img);
                        ListViewItem lvi = new ListViewItem();
                        string lviName = (i + 1).ToString() + "  Name:" + ((ImageFile)list[i]).FileName + "  宽:" + img.Width + " 高:" + img.Height;
                        this.lsv_Img.Items.Add(lviName, i);
                        this.lsv_Img.Items[i].ImageIndex = i;
                    }
                }
            }
        }
       
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            picb_Img.Visible = false;
            panel_Img.Visible = false;
        }

        private void btnClick(object sender, EventArgs e)
        {
            string btnStr = ((Button)sender).Name;   //得到按钮的名称标识如btn_205
            int btnIndex=Convert.ToInt32(btnStr.Split('_')[1]);    //分解标识以便得到图片命名的前缀如205A02.jpg
            string cmbSort = cmbType.Text;         //得到图片中的字符代号A,B,C,D,E,F。
            HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
            if (cmb_dirList.Text != "")
            {
                string bianmaPath = CreateBianMaFile(cmb_dirList.Text);
                if (bianmaPath != "")
                {
                    if (list.Count > 0)
                    {
                        clearFlag = true;
                        string htmlTemplateName = HtmFile.GetHtmlTemplateName(btnIndex);
                        switch (btnIndex)
                        {
                            case 100:
                                {
                                    if (lsb_Left.Items.Count <= 5)
                                    {
                                        ImageFile.ImgZhuRename(list);
                                        if (chb_List.Contains("Local"))
                                        {
                                            ImageFile.CopyZhuImgToFile(list, bianmaPath+"\\images");
                                        }
                                        if (chb_List.Contains("lhl62411570"))
                                        {
                                            TaoBaoApi tb = new TaoBaoApi("lhl62411570");
                                            for(int i=0;i<list.Count;i++)
                                            {
                                                tb.UploadImage(cmb_dirList.Text, ((ImageFile)list[i]).RenameImg, ((ImageFile)list[i]).FullPath);
                                            }
                                        }

                                        if (chb_List.Contains("木子李ivy"))
                                        {
                                            TaoBaoApi tb = new TaoBaoApi("木子李ivy");
                                            for (int i = 0; i < list.Count; i++)
                                            {
                                                tb.UploadImage(cmb_dirList.Text, ((ImageFile)list[i]).RenameImg, ((ImageFile)list[i]).FullPath);
                                            }
                                        }
                                        ImageFile.DeleteImage(list);
                                        MessageBox.Show("复制主图成功");
                                    }
                                    else
                                    {
                                        MessageBox.Show("主图不能多于五张");
                                    }
                                    
                                }break;
                            case 201: break;
                            case 202:
                            case 204:
                            case 215:
                            case 216:
                                {
                                    if (chb_List.Count != 0)
                                    {
                                        if (chb_List.Contains("Local"))
                                        {
                                            File.Copy("moban\\" + btnIndex + "=" + htmlTemplateName + "(loc).html", bianmaPath + "\\Local\\" + btnIndex + cmbSort + "=" + htmlTemplateName + ".html", true);
                                        }
                                        if (chb_List.Contains("taogonghuo"))
                                        {
                                            File.Copy("moban\\" + btnIndex + "=" + htmlTemplateName + "(tgh).html", bianmaPath + "\\taogonghuo\\" + btnIndex + cmbSort + "=" + htmlTemplateName + ".html", true);
                                        }
                                        if (chb_List.Contains("lhl62411570"))
                                        {
                                            File.Copy("moban\\" + btnIndex + "=" + htmlTemplateName + "(lhl).html", bianmaPath + "\\lhl62411570\\" + btnIndex + cmbSort + "=" + htmlTemplateName + ".html", true);
                                        }
                                        if (chb_List.Contains("木子李ivy"))
                                        {
                                            File.Copy("moban\\" + btnIndex + "=" + htmlTemplateName + "(ivy).html", bianmaPath + "\\木子李ivy\\" + btnIndex + cmbSort + "=" + htmlTemplateName + ".html", true);
                                        }
                                    }
                                    else
                                    {
                                        MessageBox.Show("请选择一个要保存页面的路径类型");
                                    }
                                } break;
                            case 203: break;
                            case 208: break;
                            case 205:
                            case 206:
                            case 207:
                            case 210:
                            case 211:
                            case 209:
                                {
                                    if (chb_List.Count != 0)
                                    {
                                        if (chb_List.Contains("Local"))
                                        {
                                            HtmlAgilityPack.HtmlDocument docLoc = HtmFile.WriteHTML("moban\\" + btnIndex + "="+htmlTemplateName+"(loc).html", "Local", cmb_dirList.Text, cmbSort, list);
                                            docLoc.Save(bianmaPath + "\\Local\\" + btnIndex + cmbSort + "=" + htmlTemplateName + ".html");
                                            ImageFile.CopyImageToFile(list, bianmaPath + "\\images", btnIndex + cmbSort);
                                        }

                                        if (chb_List.Contains("taogonghuo"))
                                        {
                                            HtmlAgilityPack.HtmlDocument docTgh = HtmFile.WriteHTML("moban\\" + btnIndex + "=" + htmlTemplateName + "(tgh).html", "taogonghuo", cmb_dirList.Text, cmbSort, list);
                                            docTgh.Save(bianmaPath + "\\taogonghuo\\" + btnIndex + cmbSort + "=" + htmlTemplateName + ".html");
                                        }

                                        if (chb_List.Contains("lhl62411570"))
                                        {
                                            HtmlAgilityPack.HtmlDocument docLHL = HtmFile.WriteHTML("moban\\" + btnIndex + "=" + htmlTemplateName + "(lhl).html", "lhl62411570", cmb_dirList.Text, cmbSort, list);
                                            docLHL.Save(bianmaPath + "\\lhl62411570\\" + btnIndex + cmbSort + "=" + htmlTemplateName + ".html");
                                        }

                                        if (chb_List.Contains("木子李ivy"))
                                        {
                                            HtmlAgilityPack.HtmlDocument docIvy = HtmFile.WriteHTML("moban\\" + btnIndex + "=" + htmlTemplateName + "(ivy).html", "木子李ivy", cmb_dirList.Text, cmbSort, list);
                                            docIvy.Save(bianmaPath + "\\木子李ivy\\" + btnIndex + cmbSort + "=" + htmlTemplateName + ".html");
                                        }
                                        ImageFile.DeleteImage(list);
                                        MessageBox.Show("生成页面成功！！");
                                    }
                                    else
                                    {
                                        MessageBox.Show("请选择一个要保存页面的路径类型");
                                    }
                                } break;
                            case 212: break;
                            case 213: break;
                            case 214: break;
                        }  
                    }
                    else
                    {
                        MessageBox.Show("ListBox中没有图片！！");
                    }
                }
            }
            else
            {
                MessageBox.Show("文件分类编码不能为空");
                return;
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            //string url="http://www.taogonghuo.com/taobao/11.ashx?overwrite=true&path=111";
            //System.Net.WebClient client = new System.Net.WebClient();
           // client.UploadFile(url, @"E:\TAOBAO\taobao\1237-001\11.jpg");
           // com.taogonghuo.www.TaoGonghuo tgh = new Form1.com.taogonghuo.www.TaoGonghuo();

         //   string path = tgh.HelloWorld("1237-002");
           // tgh.UploadImage(bytes, "1237-002", "11.jpg");
        }

        private void chb_CheckedChanged(object sender, EventArgs e)
        {
            if (chb_Local.Checked)
            {
                if (!chb_List.Contains("Local"))
                    chb_List.Add("Local");
            }
            else
            {
                if (chb_List.Contains("Local"))
                {
                    chb_List.RemoveAt(chb_List.IndexOf("Local"));
                }     
            }

            if (chb_tgh.Checked)
            {
                if (!chb_List.Contains("taogonghuo"))
                    chb_List.Add("taogonghuo");
            }
            else
            {
                if (chb_List.Contains("taogonghuo"))
                {
                    chb_List.RemoveAt(chb_List.IndexOf("taogonghuo"));
                }
            }

            if (chb_lhl.Checked)
            {
                if (!chb_List.Contains("lhl62411570"))
                    chb_List.Add("lhl62411570");
            }
            else
            {
                if (chb_List.Contains("lhl62411570"))
                {
                    chb_List.RemoveAt(chb_List.IndexOf("lhl62411570"));
                }
            }

            if (chb_ivy.Checked)
            {
                if (!chb_List.Contains("木子李ivy"))
                    chb_List.Add("木子李ivy");
            }
            else
            {
                if (chb_List.Contains("木子李ivy"))
                {
                    chb_List.RemoveAt(chb_List.IndexOf("木子李ivy"));
                }
            }
        }

        private void btn_update_Click(object sender, EventArgs e)
        {
            cmb_dirList.Items.Clear();
            string[] str = Directory.GetDirectories(savepath, "*-*");
            for (int i = 0; i < str.Length; i++)
                cmb_dirList.Items.Add(str[i].Split('\\')[3]);
        }

        private void cmb_dirList_SelectedIndexChanged(object sender, EventArgs e)
        {
            /*string itemPath = savepath + "\\" + cmb_dirList.Text+"\\";
            DirectoryInfo theFolder = new DirectoryInfo(itemPath);
            DirectoryInfo[] dirInfo = theFolder.GetDirectories();            //遍历文件夹
            foreach (DirectoryInfo NextFolder in dirInfo)
            {
                if (NextFolder.Name != "images")
                {
                    // this.listBox1.Items.Add(NextFolder.Name);
                    FileInfo[] fileInfo = NextFolder.GetFiles();
                    foreach (FileInfo NextFile in fileInfo)  //遍历文件
                    {
                        string xx = NextFile.Name.Split('=')[0];
                        if (xx.Contains("202"))
                        {
                            btn_202.Font = new System.Drawing.Font("宋体", 8F);
                            btn_202.Text += "  "+NextFolder.Name.Substring(0,1);
                        }
                    }
                }
            }*/
        }
    }
}
